Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deploy new version of Celostats and minnor change from celo-blockchain #1714

Merged
merged 28 commits into from
Nov 22, 2019

Conversation

jcortejoso
Copy link
Member

Description

This PR includes the changes to deploy the latest changes over celostats, particularly the ones from celo-org/ethstats-server#6. These changes include multiple UX additions and improvements, some performance tweaks, and particularly important the addition of the lists for authorized and banned nodes to submit to ethstats.
Also

Tested

Tested on a testnet (berlintestnet001), using celotool+helm chart.

Other changes

Included some changes (removing --miner.verificationpool option) from celo-org/celo-blockchain#572.
I removed the the references in celotool to this option (for helm and terraform) but I can have missed something.

Related issues

  • Fixes #[issue number here]

Backwards compatibility

Currently we need to complete the .env variable ETHSTATS_TRUSTED_ENODES with the enode address of the authorized nodes. I think we plan to change this to use the etherbase account of the authorized nodes, but not sure.
The enode address for the nodes deployed in a testnet can be obtained using:

namespace="mytestnet"
for pod in $(kubectl get pods -n $namespace -l 'component in (tx_nodes, validators)' --template '{{range .items}}{{.metadata.name}}{{"\n"}}{{end}}'); do
  kubectl exec -n $namespace -it $pod -c geth -- geth --exec "admin.nodeInfo['enode'].split('//')[1].split('@')[0]" attach | tr -d '"'
done

I can move this logic to celotool if we plan to use the enodes for authorizing for longer time.

Copy link
Contributor

@tkporter tkporter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for cleaning up verification pool url! Could you also remove it from the .env files?

.env Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Nov 14, 2019

Codecov Report

Merging #1714 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #1714    +/-   ##
=======================================
  Coverage    74.2%   74.2%            
=======================================
  Files         278     278            
  Lines        7653    7653            
  Branches      672     956   +284     
=======================================
  Hits         5679    5679            
  Misses       1857    1857            
  Partials      117     117
Flag Coverage Δ
#mobile 74.2% <ø> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 651c0ac...50bae84. Read the comment docs.

Comment on lines 44 to 55
function generateAuthorizedAddresses() {
// TODO: Add the Proxy eth addresses when available
const mnemonic = fetchEnv(envVar.MNEMONIC)
const publicKeys = []
const txNodes = parseInt(fetchEnv(envVar.TX_NODES), 0)
const validatorNodes = parseInt(fetchEnv(envVar.VALIDATORS), 0)
publicKeys.push(getAddressesFor(AccountType.TX_NODE, mnemonic, txNodes))
publicKeys.push(getAddressesFor(AccountType.VALIDATOR, mnemonic, validatorNodes))

publicKeys.push(fetchEnv(envVar.ETHSTATS_TRUSTED_ENODES).split(','))
return publicKeys.reduce((accumulator, value) => accumulator.concat(value), [])
}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tkporter I adapted to the latest changes Dimi is finishing for using etherbase accounts. Should be ready soon (need to update the commits here). Meanwhile do you think this way is ok for getting the new addresses? It is concatenated the addresses from getAddressesFor with the ones from the env ETHSTATS_TRUSTED_ENODES (this one for external nodes submitting to celostats).

@jcortejoso jcortejoso self-assigned this Nov 14, 2019
@aaitor aaitor assigned tkporter and unassigned jcortejoso Nov 18, 2019
@timmoreton timmoreton added the Priority: P0 Blocker label Nov 20, 2019
@nambrot nambrot removed the Priority: P0 Blocker label Nov 20, 2019
Copy link
Contributor

@timmoreton timmoreton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Merging -- please come back

@timmoreton timmoreton merged commit 5bea6d3 into celo-org:master Nov 22, 2019
aaronmgdr added a commit that referenced this pull request Nov 26, 2019
* master: (61 commits)
  [Wallet] Handle `/v/<code` deep links for phone verifications (#1776)
  Patch tslint auto fix for macOS Catalina until tslint#6.x is out (#1802)
  Fix typos (#1855)
  Update documentation sidebar (#1861)
  [Wallet] Update forno dev documentation (#1818)
  [Docs] Correct typo
  Validator UX docs for baklava network (#1688) (#1849)
  Various improvements to the CLI, allow voters to revote for a group (#1840)
  Serialize to hex string (#1848)
  Update faucet to pull from the reserve when possible (#1844)
  Fix elect validators migration, deploy integration (#1847)
  Configurable genesis balances (#1838)
  Deploy new version of Celostats and minnor change from celo-blockchain (#1714)
  Make default node URL consistent in celocli (#1805)
  Onboarding feedback (#1811)
  return at least true, when the function is returning bool (#1825)
  Minor Contractkit changes (#1819)
  Point end-to-end tests back to master (#1824)
  Update migration config to correct protocol parameters (#1822)
  Update with new istanbul lookback window size flag (#1820)
  ...

# Conflicts:
#	yarn.lock
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants